<?php
//帖子标签
defined('IN_TS') or die('Access Denied.');
$tagid = intval($_GET['tagid']);

$strTag = $DB->once_fetch_assoc("select * from ".dbprefix."app_tag where tagid='$tagid'");

$arrTagId = $DB->fetch_all_assoc("select * from ".dbprefix."app_tag_topic_index where tagid='$tagid'");

foreach($arrTagId as $item){

	$strTopic = $DB->once_fetch_assoc("select * from ".dbprefix."app_group_topics where topicid = '".$item['topicid']."'");
	$arrTopic[] = $strTopic;
	
}

//热门tag
$arrTag = $DB->fetch_all_assoc("select * from ".dbprefix."app_tag order by count_topic desc limit 30");

$title = $strTag['tagname'].'讨论';

include TmooTemplate("topic_tag");